package com.shop2cn.iapi.agentproducts.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.shop2cn.iapi.agentproducts.parameter.BatchGenWxCodeWhenMchChangeAvatarBean;
import com.shop2cn.iapi.agentproducts.service.BatchGenWxCodeWhenMchChangeAvatarCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymttest.utils.AgentUsers;
/**
*修改头像批量生成小程序图
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_BatchGenWxCodeWhenMchChangeAvatar{
	private static BatchGenWxCodeWhenMchChangeAvatarBean batchgenwxcodewhenmchchangeavatarBean;
	private static BatchGenWxCodeWhenMchChangeAvatarCall batchgenwxcodewhenmchchangeavatarCall;
	//渠道商
	private static int rootUserId = AgentUsers.rootUserId;
	private static String rootUserName = "NickautoTest";
	//渠道商->代理商1
	private static int agentUserId1 = AgentUsers.agentUserId1;
	private static String agentUserName1 = "NickautoTest";
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("修改头像批量生成小程序图");
	}

	@Before
	public void caseUp() {
		batchgenwxcodewhenmchchangeavatarBean=new BatchGenWxCodeWhenMchChangeAvatarBean();
		batchgenwxcodewhenmchchangeavatarCall=new BatchGenWxCodeWhenMchChangeAvatarCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(batchgenwxcodewhenmchchangeavatarCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	/**
	 * job  异步
	 */
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_BatchGenWxCodeWhenMchChangeAvatar_01() {
		Logger.start(true,"修改头像批量生成小程序图");
		try {
			batchgenwxcodewhenmchchangeavatarBean.setMchId(rootUserId);
			batchgenwxcodewhenmchchangeavatarCall.setData(batchgenwxcodewhenmchchangeavatarBean);
			batchgenwxcodewhenmchchangeavatarCall.callService();			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}